package megrez.mail.sender.web.vo;

import java.util.Locale;

import org.springframework.beans.BeanUtils;

import lombok.Data;
import megrez.mail.sender.domain.TemplateContent;

/**
 * 模板内容
 * 
 * @author Lucky Yang
 * @since 2.6.9
 */
@Data
public class TemplateContentInput {
    private String configId;
    private String subject;
    private Locale locale;
    private String data;

    public TemplateContentInput() {
    }

    public TemplateContentInput(String configId, String subject, Locale locale, String data) {
        this.configId = configId;
        this.subject = subject;
        this.locale = locale;
        this.data = data;
    }

    public TemplateContent copyTo(TemplateContent content) {
        BeanUtils.copyProperties(this, content);
        return content;
    }
}
